<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>

<script src="/FacebookAPI/js/jquery.js" type="text/javascript"></script>



<script src="/FacebookAPI/js/jquery-ui-1.9.1.custom.min.js"
	type="text/javascript"></script>
<script src="/FacebookAPI/js/jquery.autocomplete.js"></script>
<script src="/FacebookAPI/js/bootstrap-dropdown.js"
	type="text/javascript"></script>
<script src="/FacebookAPI/js/bootstrap-collapse.js"
	type="text/javascript"></script>

<script src="/FacebookAPI/js/bootstrap-tab.js"
	type="text/javascript"></script>
<script src="/FacebookAPI/js/bootstrap-modalmanager.js"></script>
<script src="/FacebookAPI/js/bootstrap-modal.js"></script>


</head>
<body>
<input type="text" id="value"/>
<input type="button" value="Post" id="show"/> 
<script Language="JavaScript">
        function getValye() {

            alert("Value "+window.location.hash);
            
        }


        $("#show").click(
				function() {
					
					
					var value =$('#value').val();
					request = $.ajax({
						url : "/FacebookAPI/Post?value="+encodeURIComponent(value)
					});
					request.done(function(msg) {

					});
				});
    </script>
   
   
   <div id='fb-root'></div>
<script src='http://connect.facebook.net/en_US/all.js'></script>
<p>
    <a href="javascript:;" onclick='postToFeed(); return false;'>Post to Group</a>
</p>
<p id='msg'></p>

<script> 
  FB.init({appId: "139384839574556", status: true, cookie: true});
  function postToFeed() {
  FB.api('/JavaSupport/links', 'post', 
             { 
                 message     : "amzn",
                 link        : "http://localhost:8080/FacebookAPI/Post.jsp",
                 picture     : '\Koala.jpg',
                 name        : 'amzn',
                 description : 'CSS Light is a showcase for web design encouragement, submitted by web designers of all over the world. We simply accept the websites with high quality and professional touch.'
                 
                 
         }, 
         function(response) {
             alert(JSON.stringify(response));
         });
  }
  </script>
  
</body>
</html>